package com.yunhe.portal.repository;
import com.yunhe.portal.domain.DataNoticeInfo;
import com.yunhe.portal.model.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

/**
 * @description 公告表
 * @author misty
 * @date 2021-10-19
 */
@Repository
public interface DataNoticeInfoRepository {

    /**
     * 新增
     * @author misty
     * @date 2021/10/19
     **/
    int createDataNoticeInfo(DataNoticeInfo dataNoticeInfo);

    /**
     * 新增
     * @author misty
     * @date 2021/10/19
     **/
    int createDataNoticeInfoSelective(DataNoticeInfo dataNoticeInfo);

    /**
     * 刪除
     * @author misty
     * @date 2021/10/19
     **/
    int deleteDataNoticeInfoByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author misty
     * @date 2021/10/19
     **/
    int updateDataNoticeInfoByPrimaryKey(DataNoticeInfo dataNoticeInfo);

    /**
     * 更新
     * @author misty
     * @date 2021/10/19
     **/
    int updateDataNoticeInfoByPrimaryKeySelective(DataNoticeInfo dataNoticeInfo);

    /**
     * 根据主键查询
     * @author misty
     * @date 2021/10/19
     **/
    DataNoticeInfo searchDataNoticeInfoByPrimaryKey(@Param("id") int id);


    List<DataNoticeInfoVo> findStationDataNoticeInfoByCondition(NoticeInfoQueryCondition noticeInfoQueryCondition);

    List<DataNoticeInfoVo> findCompanyDataNoticeInfoByCondition(NoticeInfoQueryCondition noticeInfoQueryCondition);

    List<DataPhoneNoticeInfoVo> findPhonesNoticeByCondition(PhoneQueryCondition phoneQueryCondition);

    List<DataNoticeInfo> findNeedPublishTimedNotices();

    void publishTimedNotices(@Param("ids") List<Long> ids);

    List<NewsAndNotice> getNoticeAsUrl(@Param("keyword") String keyword, @Param("noticeType") String noticeType);
}